-- GENERATED SPELL FOR [Ahn'kahar Slasher] --


function spell0_30277(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42746,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30277', 565, 1)
end

function spell1_30277(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(32714,pUnit)
pUnit:RegisterEvent('Sorts_30277', 8251, 1)
end

function spell2_30277(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(56646,pUnit)
pUnit:RegisterEvent('Sorts_30277', 6264, 1)
end

function spell3_30277(pUnit, Event) --@Triple Slash,Self--
pUnit:FullCastSpellOnTarget(56643,pUnit)
pUnit:RegisterEvent('Sorts_30277', 2000, 1)
end

function Sorts_30277(pUnit, Event)
local choix_sorts_30277 = math.random(0, 3)
if choix_sorts_30277 == 0 then
pUnit:RegisterEvent('spell0_30277', 1, 1)
end
if choix_sorts_30277 == 1 then
pUnit:RegisterEvent('spell1_30277', 1, 1)
end
if choix_sorts_30277 == 2 then
pUnit:RegisterEvent('spell2_30277', 1, 1)
end
if choix_sorts_30277 == 3 then
pUnit:RegisterEvent('spell3_30277', 1, 1)
end
end

function mob30277_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30277', math.random(1500, 3000), 1)
end

function mob30277_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30277_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30277_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30277, 1, 'mob30277_Action')
RegisterUnitEvent(30277, 2, 'mob30277_Leave')
RegisterUnitEvent(30277, 3, 'mob30277_Kill')
RegisterUnitEvent(30277, 4, 'mob30277_Die')
